#ifndef UTILITY_REALNUMBERSTRINGCOLLECTION_H
#define UTILITY_REALNUMBERSTRINGCOLLECTION_H

#include <string>
#include <unordered_map>
#include <vector>

namespace njoy {
namespace utility {

/**
 * @details 
 * A collection of valid and invalid real number strings for use in 
 * testing and developing parsing routines. All formats recognized
 * by Fortran (which numerous nuclear data file formats reference
 * when defining variable fields) are represented here.
 */
namespace realNumberStringCollection {

/* 705 valid real number strings for use in testing parsing routines */
const std::unordered_map< double, std::vector< std::string > > valid = {
  {     0.0, {  "0", "0E0", "0E+0", "0E-0", "0e0", "0e+0", "0e-0", "0D0", 
                "0D+0", "0D-0", "0d0", "0d+0", "0d-0", "0+0", "0-0", "0.", "0.E0", 
                "0.E+0", "0.E-0", "0.e0", "0.e+0", "0.e-0", "0.D0", "0.D+0", "0.D-0", 
                "0.d0", "0.d+0", "0.d-0", "0.+0", "0.-0", "0.0", "0.0E0", "0.0E+0", 
                "0.0E-0", "0.0e0", "0.0e+0", "0.0e-0", "0.0D0", "0.0D+0", "0.0D-0", 
                "0.0d0", "0.0d+0", "0.0d-0", "0.0+0", "0.0-0", "+0", "+0E0", "+0E+0", 
                "+0E-0", "+0e0", "+0e+0", "+0e-0", "+0D0", "+0D+0", "+0D-0", "+0d0", 
                "+0d+0", "+0d-0", "+0+0", "+0-0", "+0.", "+0.E0", "+0.E+0", "+0.E-0", 
                "+0.e0", "+0.e+0", "+0.e-0", "+0.D0", "+0.D+0", "+0.D-0", "+0.d0", 
                "+0.d+0", "+0.d-0","+0.+0", "+0.-0", "+0.0", "+0.0E0", "+0.0E+0", 
                "+0.0E-0", "+0.0e0", "+0.0e+0", "+0.0e-0", "+0.0D0", "+0.0D+0", 
                "+0.0D-0", "+0.0d0", "+0.0d+0", "+0.0d-0", "+0.0+0", "+0.0-0", "-0", 
                "-0E0", "-0E+0", "-0E-0", "-0e0", "-0e+0", "-0e-0", "-0D0", "-0D+0", 
                "-0D-0", "-0d0", "-0d+0", "-0d-0", "-0+0", "-0-0", "-0.", "-0.E0", 
                "-0.E+0", "-0.E-0", "-0.e0", "-0.e+0", "-0.e-0", "-0.D0", "-0.D+0", 
                "-0.D-0", "-0.d0", "-0.d+0", "-0.d-0", "-0.+0", "-0.-0", "-0.0", 
                "-0.0E0", "-0.0E+0", "-0.0E-0", "-0.0e0", "-0.0e+0", "-0.0e-0", 
                "-0.0D0", "-0.0D+0", "-0.0D-0", "-0.0d0", "-0.0d+0", "-0.0d-0", 
                "-0.0+0", "-0.0-0", "0E1", "0E+1", "0e1", "0e+1", "0D1", "0D+1", "0d1",
                "0d+1", "0+1", "+0E1", "+0E+1", "+0e1", "+0e+1", "+0D1", "+0D+1", 
                "+0d1", "+0d+1", "+0+1", "0E-1", "0e-1", "0D-1", "0d-1", "0-1", 
                "+0E-1", "+0e-1", "+0D-1", "+0d-1", "+0-1", "-0E1", "-0E+1", "-0e1", 
                "-0e+1", "-0D1", "-0D+1", "-0d1", "-0d+1", "-0+1", "-0E-1", "-0e-1", 
                "-0D-1", "-0d-1", "-0-1" } },
  {    -0.5, { "-.5","-.5E0", "-.5E+0", "-.5E-0", "-.5e0", "-.5e+0", "-.5e-0",
               "-.5D0", "-.5D+0", "-.5D-0", "-.5d0", "-.5d+0", "-.5d-0", "-.5+0", 
               "-.5-0", "-0.5","-0.5E0", "-0.5E+0", "-0.5E-0", "-0.5e0", "-0.5e+0", 
               "-0.5e-0", "-0.5D0", "-0.5D+0", "-0.5D-0", "-0.5d0", "-0.5d+0", 
               "-0.5d-0", "-0.50", "-0.5-0", "-0.50","-0.50E0", "-0.50E+0", 
               "-0.50E-0", "-0.50e0", "-0.50e+0", "-0.50e-0", "-0.50D0", "-0.50D+0", 
               "-0.50D-0", "-0.50d0", "-0.50d+0", "-0.50d-0", "-0.50+0", "-0.50-0",
               "-.50","-.50E0", "-.50E+0", "-.50E-0", "-.50e0", "-.50e+0", "-.50e-0",
               "-.50D0", "-.50D+0", "-.50D-0", "-.50d0", "-.50d+0", "-.50d-0",
               "-.50+0", "-.50-0", "-0.05E1", "-0.05E+1", "-0.05e1", "-0.05e+1", 
               "-0.05D1", "-0.05D+1", "-0.05d1", "-0.05d+1", "-0.05+1", "-5E-1", 
               "-5e-1", "-5D-1", "-5d-1", "-5-1" } },
  {     0.5, { ".5",".5E0", ".5E+0", ".5E-0", ".5e0", ".5e+0", ".5e-0", ".5D0",
               ".5D+0", ".5D-0", ".5d0", ".5d+0", ".5d-0", ".5+0", ".5-0", "0.5", 
               "0.5E0", "0.5E+0", "0.5E-0", "0.5e0", "0.5e+0", "0.5e-0",  "0.5D0", 
               "0.5D+0", "0.5D-0", "0.5d0", "0.5d+0", "0.5d-0", "0.50", "0.5-0", 
               "0.50","0.50E0", "0.50E+0", "0.50E-0", "0.50e0", "0.50e+0", "0.50e-0",
               "0.50D0", "0.50D+0", "0.50D-0", "0.50d0", "0.50d+0", "0.50d-0", 
               "0.50+0", "0.50-0", ".50",".50E0", ".50E+0", ".50E-0", ".50e0", 
               ".50e+0", ".50e-0", ".50D0", ".50D+0", ".50D-0", ".50d0", ".50d+0", 
               ".50d-0", ".50+0", ".50-0", "+.5","+.5E0", "+.5E+0", "+.5E-0", "+.5e0",
               "+.5e+0", "+.5e-0", "+.5D0", "+.5D+0", "+.5D-0", "+.5d0", "+.5d+0", 
               "+.5d-0", "+.5+0", "+.5-0", "+0.5","+0.5E0", "+0.5E+0", "+0.5E-0", 
               "+0.5e0", "+0.5e+0", "+0.5e-0", "+0.5D0", "+0.5D+0", "+0.5D-0", 
               "+0.5d0", "+0.5d+0", "+0.5d-0", "+0.50", "+0.5-0", "+0.50","+0.50E0", 
               "+0.50E+0", "+0.50E-0", "+0.50e0", "+0.50e+0", "+0.50e-0", "+0.50D0", 
               "+0.50D+0", "+0.50D-0", "+0.50d0", "+0.50d+0", "+0.50d-0", "+0.50+0", 
               "+0.50-0", "+.50","+.50E0", "+.50E+0", "+.50E-0", "+.50e0", "+.50e+0", 
               "+.50e-0", "+.50D0", "+.50D+0", "+.50D-0", "+.50d0", "+.50d+0", 
               "+.50d-0", "+.50+0", "+.50-0", "0.05E1", "0.05E+1", "0.05e1", 
               "0.05e+1", "0.05D1", "0.05D+1", "0.05d1", "0.05d+1", "0.05+1", 
               "+0.05E1", "+0.05E+1", "+0.05e1", "+0.05e+1", "+0.05D1", "+0.05D+1", 
               "+0.05d1", "+0.05d+1", "+0.05+1", "5E-1", "5e-1", "5D-1", "5d-1", 
               "5-1", "+5E-1", "+5e-1", "+5D-1", "+5d-1", "+5-1" } },
  {   -10.0, { "-10", "-10E0", "-10E+0", "-10E-0", "-10e0", "-10e+0", "-10e-0",
               "-10D0", "-10D+0", "-10D-0", "-10d0", "-10d+0", "-10d-0", "-10+0", 
               "-10-0", "-10.", "-10.E0", "-10.E+0", "-10.E-0", "-10.e0", "-10.e+0", 
               "-10.e-0", "-10.D0", "-10.D+0", "-10.D-0", "-10.d0", "-10.d+0", 
               "-10.d-0", "-10.+0", "-10.-0", "-10.0", "-10.0E0", "-10.0E+0", 
               "-10.0E-0", "-10.0e0", "-10.0e+0", "-10.0e-0", "-10.0D0", "-10.0D+0", 
               "-10.0D-0", "-10.0d0", "-10.0d+0", "-10.0d-0", "-10.0+0", "-10.0-0",
               "-1E1", "-1E+1", "-1e1", "-1e+1", "-1D1", "-1D+1", "-1d1", "-1d+1", 
               "-1+1", "-100E-1", "-100e-1", "-100D-1", "-100d-1", "-100-1" } },
  {    10.0, {  "10", "10E0", "10E+0", "10E-0", "10e0", "10e+0", "10e-0", 
                "10D0", "10D+0", "10D-0", "10d0", "10d+0", "10d-0", "10+0", "10-0",
                "10.", "10.E0", "10.E+0", "10.E-0", "10.e0", "10.e+0", "10.e-0", 
                "10.D0", "10.D+0", "10.D-0", "10.d0", "10.d+0", "10.d-0", "10.+0", 
                "10.-0", "10.0", "10.0E0", "10.0E+0", "10.0E-0", "10.0e0", "10.0e+0", 
                "10.0e-0", "10.0D0", "10.0D+0", "10.0D-0", "10.0d0", "10.0d+0", 
                "10.0d-0", "10.0+0", "10.0-0", "+10", "+10E0", "+10E+0", "+10E-0", 
                "+10e0", "+10e+0", "+10e-0", "+10D0", "+10D+0", "+10D-0", "+10d0", 
                "+10d+0", "+10d-0", "+10+0", "+10-0", "+10.", "+10.E0", "+10.E+0", 
                "+10.E-0", "+10.e0", "+10.e+0", "+10.e-0", "+10.D0", "+10.D+0", 
                "+10.D-0", "+10.d0", "+10.d+0", "+10.d-0", "+10.+0", "+10.-0", "+10.0",
                "+10.0E0", "+10.0E+0", "+10.0E-0", "+10.0e0", "+10.0e+0", "+10.0e-0",
                "+10.0D0", "+10.0D+0", "+10.0D-0", "+10.0d0", "+10.0d+0", "+10.0d-0",
                "+10.0+0", "+10.0-0", "1E1", "1E+1", "1e1", "1e+1", "1D1", "1D+1", 
                "1d1", "1d+1", "1+1", "+1E1", "+1E+1", "+1e1", "+1e+1", "+1D1", 
                "+1D+1", "+1d1", "+1d+1", "+1+1", "100E-1", "100e-1", "100D-1", 
                "100d-1", "100-1", "+100E-1", "+100e-1", "+100D-1", "+100d-1", 
                "+100-1" } },
  {-3.14159, {  "-3.14159", "-3.14159E0", "-3.14159E+0", "-3.14159E-0", 
                "-3.14159e0", "-3.14159e+0", "-3.14159e-0", "-3.14159D0", 
                "-3.14159D+0", "-3.14159D-0", "-3.14159d0", "-3.14159d+0", 
                "-3.14159d-0", "-3.14159+0", "-3.14159-0", "-.314159E1", "-.314159E+1",
                "-.314159e1", "-.314159e+1", "-.314159D1", "-.314159D+1", "-.314159d1", 
                "-.314159d+1", "-.314159+1", "-0.314159E1", "-0.314159E+1", 
                "-0.314159e1", "-0.314159e+1", "-0.314159D1", "-0.314159D+1", 
                "-0.314159d1", "-0.314159d+1", "-0.314159+1", "-31.4159E-1", 
                "-31.4159e-1", "-31.4159D-1", "-31.4159d-1", "-31.4159-1" } },
  { 3.14159, { "3.14159", "3.14159E0", "3.14159E+0", "3.14159E-0", "3.14159e0",
               "3.14159e+0", "3.14159e-0", "3.14159D0", "3.14159D+0", "3.14159D-0", 
               "3.14159d0", "3.14159d+0", "3.14159d-0", "3.14159+0", "3.14159-0",
               ".314159E1", ".314159E+1", ".314159e1", ".314159e+1", ".314159D1", 
               ".314159D+1", ".314159d1", ".314159d+1", ".314159+1", "0.314159E1", 
               "0.314159E+1", "0.314159e1", "0.314159e+1", "0.314159D1", 
               "0.314159D+1", "0.314159d1", "0.314159d+1", "0.314159+1",
               "31.4159E-1", "31.4159e-1", "31.4159D-1", "31.4159d-1", "31.4159-1",
               "+3.14159", "+3.14159E0", "+3.14159E+0", "+3.14159E-0", "+3.14159e0", 
               "+3.14159e+0", "+3.14159e-0", "+3.14159D0", "+3.14159D+0", 
               "+3.14159D-0", "+3.14159d0", "+3.14159d+0", "+3.14159d-0", 
               "+3.14159+0", "+3.14159-0", "+.314159E1", "+.314159E+1", "+.314159e1", 
               "+.314159e+1", "+.314159D1", "+.314159D+1", "+.314159d1", 
               "+.314159d+1", "+.314159+1", "+0.314159E1", "+0.314159E+1", 
               "+0.314159e1", "+0.314159e+1", "+0.314159D1", "+0.314159D+1", 
               "+0.314159d1", "+0.314159d+1", "+0.314159+1", "+31.4159E-1", 
               "+31.4159e-1", "+31.4159D-1", "+31.4159d-1", "+31.4159-1" } } };

/* 84 invalid real number strings for use in testing parsing routines */
const std::vector< std::string > invalid = {
  "silly", "twenty-one", "pi", "1s", "s1", "1..", ".", "0.0.", ".00.",  ".00.0", 
  "0.0.0", "+1a", "+a1", "a+1", "1.p", "1p.", "p1.", "+1.o", "+1o.", "+o1.", 
  "o+1.","1.5g", "1g.5", "g1.5", "+1.5f", "+1f.5", "+f1.5", "f+1.5", "1E", "1e", 
  "1D", "1d", "1+", "1-", "+1E", "+1e", "+1D", "+1d", "+1+", "+1-", "-1E", 
  "-1e", "-1D", "-1d", "-1+", "-1-", "1E+", "1e+", "1D+", "1d+", "1E-", "1e-", 
  "1D-", "1d-", "+1E+", "+1e+", "+1D+", "+1d+", "+1E-", "+1e-", "+1D-", "+1d-", 
  "1E1." , "1e1.", "1D1.", "1d1.", "+1E1.", "+1e1.", "+1D1.", "+1d1.", "-1E1.", 
  "-1e1.", "-1D1.", "-1d1.", "+1E.1", "+1e.1", "+1D.1", "+1d.1", "-1E.1", "-1e.1", 
  "-1D.1", "-1d.1", "0b01010101010", "1.6A09E667F3BCD" };  

}
}
}

#endif
